package com.example.aotdemo;

import jakarta.annotation.PostConstruct;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;


public class MyInitializingBean implements InitializingBean {

    public MyInitializingBean() {
        System.out.println("我是构造方法@@@");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("我是afterPropertiesSet方法");
    }

    @PostConstruct
    public void postConstruct(){
        System.out.println("我是postConstruct方法");
    }

    public void init(){
        System.out.println("我是init方法");
    }

}
